console.log(__filename);//打印当前文件的路径

console.log( __dirname );//打印当前文件所在的文件夹的路径

console.error("打印的是错误信息");

//process
console.log(process);

/**
 * process {
  title: 'node',
  version: 'v8.11.4',
  moduleLoadList:
   [ 'Binding contextify',
     'Binding natives',
     'Binding config',
     'NativeModule events',
     'Binding async_wrap',
     'Binding icu',
     'NativeModule util',
     'NativeModule internal/errors',
     'NativeModule internal/encoding',
     'NativeModule internal/util',
     'Binding util',
     'Binding constants',
     'NativeModule internal/util/types',
     'Binding buffer',
     'NativeModule buffer',
     'NativeModule internal/buffer',
     'Binding uv',
     'NativeModule internal/process',
     'NativeModule internal/process/warning',
     'NativeModule internal/process/next_tick',
     'NativeModule internal/async_hooks',
     'NativeModule internal/process/promises',
     'NativeModule internal/process/stdio',
     'Binding performance',
     'NativeModule perf_hooks',
     'NativeModule internal/linkedlist',
     'NativeModule internal/trace_events_async_hooks',
     'Binding trace_events',
     'NativeModule async_hooks',
     'NativeModule internal/inspector_async_hook',
     'Binding inspector',
     'NativeModule timers',
     'Binding timer_wrap',
     'NativeModule assert',
     'NativeModule module',
     'NativeModule internal/module',
     'NativeModule internal/url',
     'NativeModule internal/querystring',
     'NativeModule querystring',
     'Binding url',
     'NativeModule vm',
     'NativeModule fs',
     'NativeModule path',
     'Binding fs',
     'NativeModule stream',
     'NativeModule internal/streams/legacy',
     'NativeModule _stream_readable',
     'NativeModule internal/streams/BufferList',
     'NativeModule internal/streams/destroy',
     'NativeModule _stream_writable',
     'NativeModule _stream_duplex',
     'NativeModule _stream_transform',
     'NativeModule _stream_passthrough',
     'Binding fs_event_wrap',
     'NativeModule internal/fs',
     'NativeModule internal/loader/Loader',
     'NativeModule internal/loader/ModuleWrap',
     'Internal Binding module_wrap',
     'NativeModule internal/loader/ModuleMap',
     'NativeModule internal/loader/ModuleJob',
     'NativeModule internal/safe_globals',
     'NativeModule internal/loader/ModuleRequest',
     'NativeModule url',
     'NativeModule internal/loader/search',
     'NativeModule console',
     'Binding tty_wrap',
     'NativeModule tty',
     'NativeModule net',
     'NativeModule internal/net',
     'Binding cares_wrap',
     'Binding tcp_wrap',
     'Binding pipe_wrap',
     'Binding stream_wrap',
     'NativeModule dns',
     'NativeModule readline',
     'NativeModule string_decoder',
     'NativeModule internal/readline',
     'Binding signal_wrap' ],
  versions:
   { http_parser: '2.8.0',
     node: '8.11.4',
     v8: '6.2.414.54',
     uv: '1.19.1',
     zlib: '1.2.11',
     ares: '1.10.1-DEV',
     modules: '57',
     nghttp2: '1.32.0',
     napi: '3',
     openssl: '1.0.2p',
     icu: '60.1',
     unicode: '10.0',
     cldr: '32.0',
     tz: '2017c' },
  arch: 'x64',
  platform: 'darwin',
  release:
   { name: 'node',
     lts: 'Carbon',
     sourceUrl: 'https://nodejs.org/download/release/v8.11.4/node-v8.11.4.tar.gz',
     headersUrl: 'https://nodejs.org/download/release/v8.11.4/node-v8.11.4-headers.tar.gz' },
  argv:
   [ '/usr/local/bin/node',
     '/Users/zhangdan/Documents/NODEJS/NODEJS_LEARN/009global.js' ],
  execArgv: [],
  env:
   { TERM_PROGRAM: 'Apple_Terminal',
     SHELL: '/bin/bash',
     TERM: 'xterm-256color',
     TMPDIR: '/var/folders/db/bbs0jwdn2nvdcm571bv9s8mh0000gn/T/',
     Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.riMrPP35RI/Render',
     TERM_PROGRAM_VERSION: '388.1.2',
     TERM_SESSION_ID: 'B1A876DC-7E10-4538-A9AE-DCD150F769C9',
     USER: 'zhangdan',
     SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.VGbqNJOVLC/Listeners',
     __CF_USER_TEXT_ENCODING: '0x1F5:0x19:0x34',
     PATH: '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
     PWD: '/Users/zhangdan/Documents/NODEJS/NODEJS_LEARN',
     LANG: 'zh_CN.UTF-8',
     XPC_FLAGS: '0x0',
     XPC_SERVICE_NAME: '0',
     SHLVL: '1',
     HOME: '/Users/zhangdan',
     LOGNAME: 'zhangdan',
     _: '/usr/local/bin/node',
     OLDPWD: '/Users/zhangdan/Documents/NODEJS' },
  pid: 3829,
  features:
   { debug: false,
     uv: true,
     ipv6: true,
     tls_npn: true,
     tls_alpn: true,
     tls_sni: true,
     tls_ocsp: true,
     tls: true },
  ppid: 3026,
  execPath: '/usr/local/bin/node',
  debugPort: 9229,
  _startProfilerIdleNotifier: [Function: _startProfilerIdleNotifier],
  _stopProfilerIdleNotifier: [Function: _stopProfilerIdleNotifier],
  _getActiveRequests: [Function: _getActiveRequests],
  _getActiveHandles: [Function: _getActiveHandles],
  reallyExit: [Function: reallyExit],
  abort: [Function: abort],
  chdir: [Function: chdir],
  cwd: [Function: cwd],
  umask: [Function: umask],
  getuid: [Function: getuid],
  geteuid: [Function: geteuid],
  setuid: [Function: setuid],
  seteuid: [Function: seteuid],
  setgid: [Function: setgid],
  setegid: [Function: setegid],
  getgid: [Function: getgid],
  getegid: [Function: getegid],
  getgroups: [Function: getgroups],
  setgroups: [Function: setgroups],
  initgroups: [Function: initgroups],
  _kill: [Function: _kill],
  _debugProcess: [Function: _debugProcess],
  _debugPause: [Function: _debugPause],
  _debugEnd: [Function: _debugEnd],
  hrtime: [Function: hrtime],
  cpuUsage: [Function: cpuUsage],
  dlopen: [Function: dlopen],
  uptime: [Function: uptime],
  memoryUsage: [Function: memoryUsage],
  binding: [Function: binding],
  _linkedBinding: [Function: _linkedBinding],
  _setupDomainUse: [Function: _setupDomainUse],
  _events:
   { newListener: [Function],
     removeListener: [Function],
     warning: [Function],
     SIGWINCH: [ [Function], [Function] ] },
  _rawDebug: [Function],
  _eventsCount: 4,
  domain: null,
  _maxListeners: undefined,
  _fatalException: [Function],
  _exiting: false,
  assert: [Function],
  config:
   { target_defaults:
      { cflags: [],
        default_configuration: 'Release',
        defines: [],
        include_dirs: [],
        libraries: [] },
     variables:
      { asan: 0,
        coverage: false,
        debug_devtools: 'node',
        debug_http2: false,
        debug_nghttp2: false,
        force_dynamic_crt: 0,
        host_arch: 'x64',
        icu_data_file: 'icudt60l.dat',
        icu_data_in: '../../deps/icu-small/source/data/in/icudt60l.dat',
        icu_endianness: 'l',
        icu_gyp_path: 'tools/icu/icu-generic.gyp',
        icu_locales: 'en,root',
        icu_path: 'deps/icu-small',
        icu_small: true,
        icu_ver_major: '60',
        llvm_version: 0,
        node_byteorder: 'little',
        node_enable_d8: false,
        node_enable_v8_vtunejit: false,
        node_install_npm: true,
        node_module_version: 57,
        node_no_browser_globals: false,
        node_prefix: '/usr/local',
        node_release_urlbase: 'https://nodejs.org/download/release/',
        node_shared: false,
        node_shared_cares: false,
        node_shared_http_parser: false,
        node_shared_libuv: false,
        node_shared_nghttp2: false,
        node_shared_openssl: false,
        node_shared_zlib: false,
        node_tag: '',
        node_target_type: 'executable',
        node_use_bundled_v8: true,
        node_use_dtrace: true,
        node_use_etw: false,
        node_use_lttng: false,
        node_use_openssl: true,
        node_use_perfctr: false,
        node_use_v8_platform: true,
        node_without_node_options: false,
        openssl_fips: '',
        openssl_no_asm: 0,
        shlib_suffix: '57.dylib',
        target_arch: 'x64',
        uv_parent_path: '/deps/uv/',
        uv_use_dtrace: true,
        v8_enable_gdbjit: 0,
        v8_enable_i18n_support: 1,
        v8_enable_inspector: 1,
        v8_no_strict_aliasing: 1,
        v8_optimized_debug: 0,
        v8_promise_internal_field_count: 1,
        v8_random_seed: 0,
        v8_trace_maps: 0,
        v8_use_snapshot: true,
        want_separate_host_toolset: 0,
        xcode_version: '7.0' } },
  emitWarning: [Function],
  nextTick: [Function: nextTick],
  _tickCallback: [Function: _tickCallback],
  _tickDomainCallback: [Function: _tickDomainCallback],
  stdout: [Getter],
  stderr: [Getter],
  stdin: [Getter],
  openStdin: [Function],
  exit: [Function],
  kill: [Function],
  _immediateCallback: [Function: processImmediate],
  argv0: 'node',
  mainModule:
   Module {
     id: '.',
     exports: {},
     parent: null,
     filename: '/Users/zhangdan/Documents/NODEJS/NODEJS_LEARN/009global.js',
     loaded: false,
     children: [],
     paths:
      [ '/Users/zhangdan/Documents/NODEJS/NODEJS_LEARN/node_modules',
        '/Users/zhangdan/Documents/NODEJS/node_modules',
        '/Users/zhangdan/Documents/node_modules',
        '/Users/zhangdan/node_modules',
        '/Users/node_modules',
        '/node_modules' ] } }
 */
